/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

var nav4 = window.Event ? true : false;
function IsNumber(e){
    if (window.event){
        tecla = (document.all) ? e.keyCode : e.which;
        if (tecla==8 || tecla==127 || tecla==9) return true; //Tecla de retroceso (para poder borrar)
        //patron = /\d/;
        patron = /^\d+(?:\.\d{0,2})$/;
        te = String.fromCharCode(tecla);
        return patron.test(te);
    }
    else{
        var key = nav4 ? e.which : e.keyCode;
        return ((key = 48 && key <= 57));
    }
}

